home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 014 / libtools.arc / NUSQ.DOC < prev    next >
Encoding:
Text File  |  1984-08-20  |  13.0 KB  |  305 lines

  1.  
  2.  
  3.                   NUSQ - File unsqueeze utility
  4.  
  5.           Documentation for CP/M-86 and MS-DOS
  6.            versions 1.10, 1.03 & 1.03D
  7.                    Cliff Sharp  June 22, 1984
  8.  
  9.                DOCUMENTATION TOPICS
  10.  
  11.     OVERVIEW
  12.     COMMAND MODE
  13.     INTERACTIVE MODE
  14.     INSTALLATION
  15.     IN CASE OF TROUBLE
  16.     ANNOUNCEMENT
  17.     HISTORY
  18.  
  19.                  OVERVIEW
  20.  
  21.      NUSQ  is  a utility for expanding squeezed  files  to  their 
  22. original  uncompressed state.  Two separate versions of NUSQ  are 
  23. available,  one  for  CP/M-86  and one for the  MS-DOS  operating 
  24. system.
  25.  
  26.      NUSQ has two operating modes.  In the command mode, a single 
  27. instruction to NUSQ is passed from the command line which invokes 
  28. NUSQ.  The command mode requires less effort to use when you have 
  29. only  one file to unsqueeze,  or when the names of the files  you 
  30. wish  to unsqueeze can all be specified by one  "wildcard"  name.  
  31. However,  when  you  have more than one file to unsqueeze  and  a 
  32. "wildcard" won't do the job right,  or when the files you want to 
  33. unsqueeze are on more than one disk,  the interactive mode allows 
  34. you to specify only those files which you want processed, without 
  35. reloading the program every time.   In the interactive mode, NUSQ 
  36. executes one command, then waits for another.
  37.  
  38.                           COMMAND MODE
  39.  
  40.      To  unsqueeze  only one file,  the command  mode  invocation            
  41.  
  42.                         A>nusq nerts.aqm
  43.  
  44. will unsqueeze the file NERTS.AQM.  You don't need to specify the 
  45. name of the output file (in fact, you can't); the name was stored 
  46. within the file at the time it was squeezed,  and that name  will 
  47. be  used  to  create  the new file.   (If you  want  to  name  it 
  48. differently after you have unsqueezed it,  use the REName command 
  49. when NUSQ is finished.)
  50.  
  51.      You  can  unsqueeze all squeezed files on a single  disk  by 
  52. issuing the command
  53.  
  54.                           A>nusq *.?q?
  55.  
  56. Theoretically at least,  all file squeezers create an output file 
  57. whose name is the same as that of the original file,  except that 
  58. the  filename extension field is modified by changing the  middle 
  59. letter to a "Q".  (If a file has no filetype, a 'QQQ' is appended 
  60. for  the  file type for the encoded file.  When a file  has  been 
  61. renamed after being squeezed, this cannot be the case; hopefully, 
  62. the  person  who renamed it remembered the "Q".)  The  "wildcard" 
  63. file  specification shown above tells NUSQ to unsqueeze any  file 
  64. it  finds (on the default disk) which has a "Q" in  the  filename 
  65. extension;  that should get NUSQ to unsqueeze every squeezed file 
  66. on  the disk.   NUSQ will display the name of each file it finds, 
  67. and the name of the output file it produces, as it proceeds:
  68.  
  69.           NERTS.AQM -> NERTS.ASM
  70.                   ORGPLOTZ.DQC -> ORGPLOTZ.DOC
  71.  
  72.      Because  NUSQ checks the first two bytes of each input  file 
  73. for a valid Squeeze Signature (0FF76 hex), it is possible to say:
  74.  
  75.                             nusq *.*
  76.  
  77. and get the same results as nusq *.?q?.   It is faster,  however, 
  78. to  use  the  *.?q?  method,  as  that will  preclude  a  lot  of 
  79. unnecessary  file openings.
  80.  
  81.     NUSQ  will also accept more than one filename on the  command 
  82. line:
  83.  
  84.               A>nusq nerts.aqm orgplotz.dqc frop.cq
  85.  
  86.      To  use a different disk for output than for input,  end the 
  87. command line with just the drive designation. Example:
  88.  
  89.                       A>nusq giggle.tqt b:
  90.  
  91. will write the output file (ostensibly GIGGLE.TXT) on drive B:.
  92. You will find that NUSQ is very forgiving, as:
  93.  
  94.                       A>nusq b: giggle.tqt
  95.  
  96. will accomplish the same thing.
  97.  
  98.                          INTERACTIVE MODE
  99.  
  100.      Let's  suppose now that you have a large number of  squeezed 
  101. files on your disk,  and you only want to unsqueeze some of them.  
  102. Unless  you  can specify only those files by using  a  "wildcard" 
  103. name,  you'll  probably  find it easier to achieve your  goal  by 
  104. using  the interactive mode of NUSQ.   Another instance where  it 
  105. would  be easier to use interactive mode is one where  the  files 
  106. you wish to unsqueeze are on more than one disk, in more than one 
  107. drive.  The command
  108.  
  109.                              A>nusq
  110.  
  111. displays the startup message, then prompts for command input with 
  112. an asterisk ("*").
  113.  
  114. NUSQ  Version x.xx
  115. Dave Rand, Paul Homchick and Cliff Sharp  xx/xx/xx
  116. Use: NUSQ afn [afn afn ...] [destination drive:]
  117. *_
  118.  
  119. (The underline shows the cursor position; my name appears only in 
  120. the  MS-DOS  version.)   At the asterisk,  you  type  a  filename 
  121. ("wildcards"  are allowed here,  too).   NUSQ will unsqueeze  the 
  122. file,  then  print  the asterisk prompt again and wait  for  more 
  123. commands.   When you're finished and want to exit NUSQ,  a  blank 
  124. line or ^C will return you to the operating system.
  125.  
  126.      As  distributed,  NUSQ  won't  write over an  existing  file 
  127. without the user confirming the operation.   Something very  like 
  128. the following will happen:
  129.  
  130.           A>nusq foo.bqr
  131.  
  132.           nusq: FOO.BQR -> FOO.BAR already exists,
  133.                 Overwrite <Y>es, <N>o? overwriting...
  134.  
  135. In this case the user answered "Y" at the question mark, and NUSQ 
  136. went  ahead  with the operation.   If "N" is  the  response,  the 
  137. unsqueeze  operation is aborted,  and the program goes on to  the 
  138. next item in the list (or exits, if the list is empty).
  139.  
  140.             INSTALLATION
  141.  
  142. Two  user-configurable options are provided: Confirm Before Over-
  143. write, and Use Input File Date for Output File.
  144.  
  145. As distributed, NUSQ v1.03 will ask for confirmation before over-
  146. writing  a  file,  and  will  use  the current date and time when
  147. creating the output file.
  148.  
  149. If  you  would  rather have NUSQ write over existing  files  with 
  150. wanton abandon,  without pausing and asking for confirmation, use 
  151. DEBUG.COM to patch location 0103H to be 00H instead of 0FFH.   An 
  152. example of this patch:
  153.  
  154.               A>debug b:nusq.com
  155.               -e103
  156.               xxxx:0103 FF.00
  157.               -w
  158.               Writing XXXX bytes
  159.               -q
  160.  
  161.                   A>
  162.  
  163. If you would like the unsqueezed file to retain the same date and
  164. time  as  the input file, patch 0104H to an 0FFH.  Copies of NUSQ
  165. patched in this manner will  display  a  'D'  after  the  version
  166. number  signifying  that  the  input  file  date  option has been
  167. enabled, i.e.  "1.03D".
  168.  
  169. If you have a back-up utility that uses the file date and time to
  170. determine  whether  or  not  a  file  should  be backed up, it is
  171. possible that using the input file date could  cause  loss  of  a
  172. file  by  having  an  'old'  date  on  a 'new' file, and losing a
  173. backup.  This is why NUSQ  is  distributed  with  the  date  mode
  174. disabled.
  175.  
  176.  
  177.                        IN CASE OF TROUBLE
  178.  
  179.      First,  no  matter HOW sure you are that you're doing things 
  180. correctly,  try  another  method of using  NUSQ.   If  you  tried 
  181. command mode without luck,  try the interactive mode; if you were 
  182. in the interactive mode when it bombed,  try command mode.   Make 
  183. sure  you try at least one command that is just like one shown in 
  184. this document (but,  of course, use the name of your file instead 
  185. of NERTS or ORGPLOTZ) before you conclude that things are awry.
  186.  
  187.      Occasionally,  for one reason or another,  it's possible  to 
  188. get a bad copy of a program or file; transmission errors and disk 
  189. errors  have  been  known to cause many problems.   (If  you  can 
  190. successfully unsqueeze at least one squeezed file,  you  probably 
  191. have  a good copy of the program;  if so,  your copy of the  file 
  192. you're  trying to unsqueeze may be the culprit.)  The best way to 
  193. tell  if  this is the case is to use a utility like CRCK  on  the 
  194. original copy of the offending file/program, and on your copy; if 
  195. the numbers you get don't match,  you most likely have a bad copy 
  196. of the file/program you checked and should obtain another copy of 
  197. it.  (Check the new copy, too, when you get it.)
  198.  
  199.      This  may sound silly,  but do you have the correct  version 
  200. for your operating system?  If you try to run the CP/M-86 version 
  201. under  MS-DOS,  strange things may happen;  same for  the  MS-DOS 
  202. version  under  CP/M-86.   The MS-DOS version has an "M"  in  the 
  203. version  number.   Also,  try  using  TYPE to actually  type  the 
  204. executable  file  on  your screen;  you'll most  likely  see  the 
  205. author's  name.   (See the history later in this document to  see 
  206. who wrote what.)
  207.  
  208.      If all that checks out,  the logical next step is to compare 
  209. notes with someone locally to see if anyone else is  experiencing 
  210. problems.  The system operator ("sysop") of the system from which 
  211. you  obtained the software can usually be of help if you tell him 
  212. which  program you're using (CP/M-86 or MS-DOS) and the  name  of 
  213. the    file   you're   trying   unsuccessfully   to    unsqueeze.  
  214. Alternatively,  you  can leave a message addressed to "ALL" on  a 
  215. local  bulletin board;  usually some helpful person will jump  in 
  216. with suggestions.
  217.  
  218.      If  you've tried all this,  and you're still sure you have a 
  219. problem,  then it's last-resort time.  Contact the author of your 
  220. version of the program.   His name,  and a way to contact him, is 
  221. in the very beginning of the NUSQ.COM file; TYPE NUSQ.COM and you 
  222. should see it.   (If that doesn't work,  use DDT,  SID or DEBUG.)  
  223. This  is  by far the slowest method of  resolving  problems,  and 
  224. people  who  contact  program authors  with  problems  caused  by 
  225. operator  error are usually looked upon unfavorably,  so do  this 
  226. only  if  all  else fails.   Be sure to include the name  of  the 
  227. system  where you got your copy of the program,  the name of  the 
  228. file  you're trying to unsqueeze and the place where you got  the 
  229. file,  and  a description of what went wrong.   It might also  be 
  230. nice  to know the names of any people who have tried to help  you 
  231. with your problem so far.
  232.  
  233.                           ANNOUNCEMENT
  234.  
  235.      A look at the signon messgae in interactive mode will reveal 
  236. that NUSQ is the result of committee action.   Said committee was 
  237. unable  to agree on whether the source code should be distributed 
  238. as public domain code.   Consequently,  source code is not avail-
  239. able.
  240.  
  241.                              HISTORY
  242.  
  243.  
  244.      NUSQ  is  a  file unsqueezer  utility  written  entirely  in 
  245. assembly language.  The first file squeezer and unsqueezer in the 
  246. public  domain  were  written  by  Richard  Greenlaw,  in  the  C 
  247. programming language.   A Z80 assembly language version was  done 
  248. by Gail Zacharias at MIT in the Spring of 1983.  In late '83 Dave 
  249. Rand wrote an 8080 version,  which went through several versions, 
  250. culminating  in  USQ120.COM.  Paul Homchick assumed the  task  of 
  251. converting  Dave's  efforts to 8086/8088  assembly  language  for 
  252. execution  under  CP/M-86 in early 1984,  and I converted  Paul's 
  253. version to run under MS-DOS a bit later.
  254.  
  255.  
  256.                           CP/M VERSIONS
  257.  
  258.     1.08    January  28,  1984.   First released version 
  259.                 uploaded to Compuserve.
  260.  
  261.     1.09c    March  24,  1984.   Carriage Return on empty 
  262.                 line exits program.   Optimized  tree-walker
  263.                 adapted  from   MS-DOS  version resulting in
  264.         15%  speed  increase.
  265.  
  266.     1.10    June  22,  1984.   Prior tree-walker was not
  267.                 as optimized as we thought.  Further optimi-
  268.         zation borrowed from MS-DOS version, result-
  269.         in another 25% increase in speed.
  270.  
  271.                          MS-DOS VERSIONS
  272.  
  273.     1.00M    March 21, 1984.   Original version  uploaded 
  274.                 to  Compuserve.   Had serious bug that some-
  275.                 times resulted in short files with no  warn-
  276.                 ing.
  277.  
  278.     1.01M    March 31,  1984.   Carriage Return on  empty 
  279.                 line at Command prompt ("*"), now returns to 
  280.                 DOS  instead of giving another prompt  line.  
  281.                 Short File BUG still in this version!
  282.  
  283.     1.02M    April  12,  1984.   Fixed Random Block Write 
  284.                 DOS  calls.   Files  now unsqueeze to  exact 
  285.                 length,  instead of 128-byte multiples as in 
  286.                 prior versions.   Buffer flush code fixed to 
  287.                 eliminate short file bug.
  288.  
  289.     1.03 and 1.03D      June 22, 1984.  Decode routines  re-
  290.         written for a  30  percent increase in speed.
  291.                 Version 1.03D uses date and time of the input
  292.         file when creating output file, 1.03 does not
  293.         do so.   This date feature  can  be user con-
  294.         figured by changing a byte at  offset  +4  in
  295.         the .com file.  See 'Installation,' above for
  296.         details.   Versions  prior to this one always
  297.         appended  a  1A  hex  to  the  end of the un-
  298.         squeezed  file.  This  CP/M  anachronism  has
  299.         been removed in this version.
  300.  
  301. CP/M and CP/M-86 are trademarks of Digital Research, Inc.
  302. MS (as in MS-DOS) is a trademark of Microsoft, Inc.
  303. demarks of Digital Research, Inc.
  304. MS (as in MS-DOS) is a trademark of Microsoft, Inc.